package contracts.emailReset

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    request {
        method "PUT"
        url value(producer("/api/email-reset/123456")
                , consumer("/api/email-reset/\\d+"))
    }
    response {
        status 200
        body("""
            {
                "message":"修改绑定邮箱成功！请回到系统中刷新页面，查看绑定结果！",
                "status":"SUCCESS"
            }
        """)
        bodyMatchers {
            jsonPath('$.message', byType())
            jsonPath('$.status', byType())
        }
        headers {
            header("Content-Type", "application/json;charset=UTF-8")
        }
    }
}
